package io.renren.modules.substation.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.substation.dao.TSampBasiDataInfoDao;
import io.renren.modules.substation.entity.TSampBasiDataInfoEntity;
import io.renren.modules.substation.service.TSampBasiDataInfoService;


@Service("tSampBasiDataInfoService")
public class TSampBasiDataInfoServiceImpl extends ServiceImpl<TSampBasiDataInfoDao, TSampBasiDataInfoEntity> implements TSampBasiDataInfoService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TSampBasiDataInfoEntity> page = this.page(
                new Query<TSampBasiDataInfoEntity>().getPage(params),
                new QueryWrapper<TSampBasiDataInfoEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public int updateByDevId(TSampBasiDataInfoEntity tSampBasiDataInfoEntity)
    {
        return baseMapper.updateByDevId(tSampBasiDataInfoEntity);
    }

    @Override
    public int updateSampValueByDevData(TSampBasiDataInfoEntity tSampBasiDataInfoEntity)
    {
        return baseMapper.updateSampValueByDevData(tSampBasiDataInfoEntity);
    }

}